import 'package:framelib/config/route_config.dart';
import 'package:get/get.dart';
import 'package:module_business/module_comm/view/login_email_page.dart';
import 'package:module_business/module_comm/view/login_page.dart';
import 'package:module_business/module_comm/view/splash_page.dart';
import 'package:module_business/module_comm/viewmodel/login_email_view_model.dart';
import 'package:module_business/module_comm/viewmodel/login_view_model.dart';
import 'package:module_business/module_comm/viewmodel/splash_view_model.dart';

class ModuleCommRoute {
  static final List<GetPage> getPages = [
    // GetPage(name: RouteConfig.splashPage, page: () => SplashPage()),
    GetPage(
        name: RouteConfig.splashPage,
        page: () => SplashPage(),
        binding:
        BindingsBuilder(() => [Get.lazyPut(() => SplashViewModel())])),
    GetPage(
        name: RouteConfig.loginPage,
        page: () => LoginPage(),
        binding:
        BindingsBuilder(() => [Get.lazyPut(() => LoginViewModel())])),
    GetPage(
        name: RouteConfig.loginEmailPage,
        page: () => LoginEmailPage(),
        binding:
        BindingsBuilder(() => [Get.lazyPut(() => LoginEmailViewModel())])),

    // GetPage(
    //     name: '/TestTwoPage',
    //     page: () => TestTwoPage(),
    //     binding: BindingsBuilder(() => Get.create(
    //           () {
    //             var testTwoViewModel = TestTwoViewModel();
    //             print(
    //                 'testTwoViewModel-->create,hash=${testTwoViewModel.hashCode}');
    //             viewModelHashCodes[
    //                     'TestTwoViewModel_${testTwoViewModel.hashCode}'] =
    //                 testTwoViewModel;
    //             return testTwoViewModel;
    //           },
    //           permanent: false,
    //         ))
    //     // binding: BindingsBuilder(() => [Get.lazyPut(() => TestTwoViewModel(),)])
    //     ),
  ];
}
